﻿package kit4j.tests.jdk.awt;

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;

public class TestDesktop {

	public static void main(String[] args) {
		openFile(new File("E:/formCheck.js"));
		try {
			Desktop.getDesktop().mail();
		} catch (IOException e) {
			e.printStackTrace();
		}
//		editFile(new File(
//				"E:/workspace/CalculationSet/src/main/java/com/surekam/cs/action/Main.java"));
	}

	public static void openFile(File f) {
		Desktop dt = Desktop.getDesktop();
		try {
			dt.open(f);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void editFile(File f) {
		Desktop dt = Desktop.getDesktop();
		try {
			dt.edit(f);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
